<?php
use yii\widgets\LinkPager;
use yii\widgets\Breadcrumbs;
use app\modules\core\widgets\SlideNav;

$this->title = "模板列表";
?>

<div class="container-fluid">
	<div class="row">
		
        <?= SlideNav::widget() ?>
		<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 col-lg-10 col-lg-offset-2 main">
            <?= Breadcrumbs::widget([
                'homeLink' => ['label' => 'HOME', 'url' => '/core'],
                'links' => [
                    '模型',
                ]
            ]) ?>
			
			<div class="row">
				<div class="col-md-12 col-lg-12">
					<div class="alert alert-warning">
						<button type="button" class="close" data-dismiss="alert">×</button>
						<strong>警告!</strong> 请注意你的个人隐私安全.
					</div>
					<div class="">
						<a type="button" class="btn btn-primary pull-right" data-dismiss="alert" href="/core/model/create">新建</a>
					</div>
					<table class="table table-striped">
						<thead>
							<tr>
								<th>
                                    ID
								</th>
								<th>
									名称
								</th>
								<th>
									引用个数
								</th>
								<th>
									字段个数
								</th>
								<th>
								</th>
							</tr>
						</thead>
						<tbody>
                            <?php foreach ($models as $model) { ?>
							<tr class="">
								<td>
                                    <?php echo $model['id']; ?>
								</td>
								<td>
                                    <?php echo $model['modelName']; ?>
								</td>
								<td>
                                    <?php echo $model['refCount']; ?>
								</td>
								<td>
                                    <?php echo $model['fcount']; ?>
								</td>
								<td>
                                    <a type="button" class="btn btn-default to-info" href="/core/model/info?id=<?= $model['id'] ?>">查看</a>
								</td>
							</tr>
                            <?php } ?>
						</tbody>
					</table>
                    <?php echo LinkPager::widget(['pagination' => $pagination, 'hideOnSinglePage' => false]) ?>
				</div>
			</div>
		</div>
	</div>
</div>

<script>
</script>
